import {myFetch} from '@/assets/js/utils'

export default{
    async getLocation (mobile) {
        const data = await myFetch({
            name: 'shopping.sys.phoneOwnership',
            mobile
        }, {url2: true})
        return data
    },
    async getGoods () {
        const data = await myFetch({
            name: 'shopping.sys.goodsList'
        }, {url2: true})
        return data
    },
    async submitOrder ({ phone, goodsId, datangNo, userId }) {
        const data = await myFetch({
            name: 'shopping.sys.orderSubmit',
            mobile: phone,
            goods_id: goodsId,
            shopMobile: datangNo,
            user_id: userId
        }, {url2: true})
        return data
    }
}
